<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('卡账关系列表')" />
</head>
<body class="gray-bg">
 <div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-md-12">
            <div class="panel blank-panel">
                <div class="panel-heading">
                    <div class="panel-options">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="paeaDsLink.html#tab-1"><i class="fa fa-search">卡户关联查询</i></a>
                            </li>
                            <li class=""><a data-toggle="tab" href="dsAccInvm.html#tab-2"><i class="fa fa-search">主子账户查询</i></a>
                            </li>
                            <li class=""><a data-toggle="tab" href="paeaDsLink.html#tab-3"><i class="fa fa-search">新旧账号</i></a>
                            </li>
                            <li class=""><a data-toggle="tab" href="paeaDsLink.html#tab-4"><i class="fa fa-search">证件卡户</i></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="tab-content">
                        <div id="tab-1" class="tab-pane active">
                            <!--默认paeaDsLink页面内容-->
                            <div class="container-div">
                                <div class="row">
                                    <div class="col-sm-12 search-collapse">
                                        <form id="formId">
                                            <div class="select-list">
                                                <ul>
                                                    <li>
                                                        <p>卡号：</p>
                                                        <input type="text" name="opc1CardNo" id="opc1CardNo"/>
                                                    </li>
                                                    <li>
                                                        <p>帐户：</p>
                                                        <input type="text" name="opc1Account" id="opc1Account"/>
                                                    </li>
                                                    <li>
                                                        <a class="btn btn-primary btn-rounded btn-sm" onclick="tableSearch()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                                        <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </form>
                                    </div>
                                    <div class="col-sm-12 select-table table-striped">
                                        <table id="bootstrap-table"></table>
                                    </div>
                                </div>
                            </div><!--默认paeaDsLink页面内容结束-->
                        </div>

                        <div id="tab-2" class="tab-pane">
                            <div th:include="query/paeaDsLink/dsAccInvm :: dsAccInvm"></div>
                        </div>
                        <div id="tab-3" class="tab-pane">
                            <div th:include="query/paeaDsNewOldAccount/paeaDsNewOldAccount :: paeaDsNewOldAccount"></div>
                        </div>
                        <div id="tab-4" class="tab-pane">
                            <div th:include="query/paeaDsLink/dsCustAccLink :: dsCustAccLink"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
 </div>

    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "query/paeaDsLink";
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "卡账关系",
            //启用跳转至指定页
            showPageGo: true,
            //启用点击选中行
            clickToSelect: true,
            columns: [
            {
                field : 'id',
                title : 'id',
                visible: false
            },
            {
                field : 'opc1AppgDate',
                title : '数据日期',
                visible:false
            },
            {
                field : 'opc1CardNo',
                title : '卡号'
            },
            {
                field : 'opc1Account',
                title : '帐户'
            },
            {
                field : 'opc1HostType',
                title : 'Bancs帐户类型',
                visible:false
            },
            {
                field : 'opc1HostCat',
                title : 'Bancs帐户类型',
                visible:false
            },
            {
                field : 'opc1IsPrimary',
                title : '主帐户标志'
            },
            {
                field : 'opc1Channel',
                title : '渠道类型',
                visible:false
            },
            {
                field : 'opc1Currency',
                title : '货币号'
            }]
        };
        $(function () {
            $.table.init(options);
        });
        function tableSearch(){
            var opc1CardNo = $("#opc1CardNo").val();
            var opc1Account = $("#opc1Account").val();
            if(opc1CardNo==''&&opc1Account==''){
                alert("请至少输入一项");
                return;
            }
            $.table.destroy();
            options.url = prefix+"/query";
            $.table.init(options);
        }
    </script>
     <script th:inline="javascript">
         var prefix2 = ctx + "query/paeaDsInvt";
         var options2 = {
             id:'bootstrap-table-2',
             formId:'formId2',
             url: prefix2 + "/list",
             createUrl: prefix2 + "/add",
             updateUrl: prefix2 + "/edit/{id}",
             removeUrl: prefix2 + "/remove",
             exportUrl: prefix2 + "/export",
             modalName: "主子账户查询",
             //启用跳转至指定页
             showPageGo: true,
             //启用点击选中行
             clickToSelect: true,
             columns: [
                 {
                     field : 'masterAcNo',
                     title : '主账号'
                 },
                 {
                     field : 'subAcNo',
                     title : '子账号'
                 },
                 {
                     field : 'customerNo',
                     title : '客户号'
                 },
                 {
                     field : 'customerName',
                     title : '客户名'
                 },
                 {
                     field : 'currency',
                     title : '货币号(ISO标准)'
                 }]
         };
         $(function () {
             $.table.init(options2);
         });
         function tableSearch2(){
             var ad05MasterAcNo = $("#ad05MasterAcNo").val();
             var ad05SubAc = $("#ad05SubAc").val();
             if(ad05MasterAcNo==''&&ad05SubAc==''){
                 alert("请至少输入一项");
                 return;
             }
             $.table.destroy('bootstrap-table-2');
             options2.url = prefix2+"/queryAccInvm";
             $.table.init(options2);
         }
     </script>
     <script th:inline="javascript">
         var prefix3 = ctx + "query/paeaDsNewOldAccount";
         var options3 = {
             id:'bootstrap-table-3',
             formId:'formId3',
             url: prefix3 + "/list",
             createUrl: prefix3 + "/add",
             updateUrl: prefix3 + "/edit/{id}",
             removeUrl: prefix3 + "/remove",
             exportUrl: prefix3 + "/export",
             modalName: "新旧账号",
             //启用跳转至指定页
             showPageGo: true,
             //启用点击选中行
             clickToSelect: true,
             columns: [{
                 checkbox: true
             },
                 {
                     field : 'newAccount',
                     title : '新账号'
                 },
                 {
                     field : 'oldAccount',
                     title : '旧账号'
                 },
                 {
                     field : 'remark',
                     title : '备注'
                 }]
         };
         $(function () {
             $.table.init(options3);
         });
         function tableSearch3(){
             var newAccount = $("#newAccount").val();
             var oldAccount = $("#oldAccount").val();
             if(newAccount==''&&oldAccount==''){
                 alert("请至少输入一项");
                 return;
             }
             $.table.destroy('bootstrap-table-3');
             options3.url = prefix3+"/queryDsNewOldAccount";
             $.table.init(options3);
         }
     </script>
     <script th:inline="javascript">
         var prefix4 = ctx + "query/paeaDsCusv";
         var options4 = {
             id:'bootstrap-table-4',
             formId:'formId4',
             url: prefix4 + "/list",
             createUrl: prefix4 + "/add",
             updateUrl: prefix4 + "/edit/{id}",
             removeUrl: prefix4 + "/remove",
             exportUrl: prefix4 + "/export",
             modalName: "证件卡户",
             //启用跳转至指定页
             showPageGo: true,
             //启用点击选中行
             clickToSelect: true,
             columns: [
                 {
                     field : 'accNo',
                     title : '账号'
                 },
                 {
                     field : 'prdCde',
                     title : '产品码'
                 },
                 {
                     field : 'custNo',
                     title : '客户号'
                 },
                 {
                     field : 'custName',
                     title : '客户名'
                 },
                 {
                     field : 'idNo',
                     title : '证件号'
                 },
                 {
                     field : 'curAmt',
                     title : '当前余额'
                 }]
         };
         $(function () {
             $.table.init(options4);
         });
         function tableSearch4(){
             var custNo = $("#custNo").val();
             var accNo = $("#accNo").val();
             var idNo = $("#idNo").val();
             if(custNo==''&&accNo==''&&idNo==''){
                 alert("请至少输入一项");
                 return;
             }
             $.table.destroy('bootstrap-table-4');
             options4.url = prefix4+"/queryDsCustAccLink";
             $.table.init(options4);
         }
     </script>
</body>
</html>